package lab03.Test06;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;

/**
 * Created by lenovo on 2017/12/12.
 */
public class test {public static void main(String[] args) {
    String path = "D:\\hello.txt";
    try {
        RandomAccessFile randomAccessFile = new RandomAccessFile(path,"r");

        String line = null;
        while((line = randomAccessFile.readLine())!= null){

        }
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
}
